package com.lrs.java.j2se_self.collection;

import java.util.*;
public class TestArgWords {
	private static final Integer N = new Integer(1);
	
	public static void main(String[] args){
		Map m = new HashMap();
		for(int i=0;i<args.length;i++){
			Integer freq = (Integer)m.get(args[i]);
			m.put(args[i],freq == null ? N.intValue(): ((Integer)freq)+1 );	
		}
		System.out.println(m.size()+ " words found");
		System.out.println(m);
	}
}
